package com.cskaoyan.bean.vo.wx.wxcatalogindex;

import com.cskaoyan.bean.MarketCategory;
import lombok.Data;

import java.util.Date;

/**
 * @author Yan Dexuan
 * @since 2022/06/29 14:17
 */
@Data
public class WXCurrentCategoryVo {

    Integer id;

    String name;

    String keywords;

    String desc;

    Integer pid;

    String iconUrl;

    String picUrl;

    String level;

    Byte sortOrder;

    Date addTime;

    Date updateTime;

    Boolean deleted;

    public static WXCurrentCategoryVo setWXCurrentCategoryVo(MarketCategory marketCategory){

        WXCurrentCategoryVo wxCurrentCategoryVo = new WXCurrentCategoryVo();
        wxCurrentCategoryVo.setId(marketCategory.getId());
        wxCurrentCategoryVo.setName(marketCategory.getName());
        wxCurrentCategoryVo.setKeywords(marketCategory.getKeywords());
        wxCurrentCategoryVo.setPid(marketCategory.getPid());
        wxCurrentCategoryVo.setIconUrl(marketCategory.getIconUrl());
        wxCurrentCategoryVo.setPicUrl(marketCategory.getIconUrl());
        wxCurrentCategoryVo.setLevel(marketCategory.getLevel());
        wxCurrentCategoryVo.setSortOrder(marketCategory.getSortOrder());
        wxCurrentCategoryVo.setAddTime(marketCategory.getAddTime());
        wxCurrentCategoryVo.setUpdateTime(marketCategory.getUpdateTime());
        wxCurrentCategoryVo.setDeleted(marketCategory.getDeleted());

        return wxCurrentCategoryVo;

    }

}
